﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// abstract OrganizacijaZiroRacun typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class OrganizacijaZiroRacunDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<OrganizacijaZiroRacunDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.OrganizacijaZiroRacun _currentOrganizacijaZiroRacun = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxOrganizacijaZiroRacunDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxOrganizacijaZiroRacunErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxOrganizacijaZiroRacunBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the ID property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDOrganizacija property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDOrganizacijaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ZiroRacun property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxZiroRacunDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Konto property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxKontoDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDVrstaFinDokumenta property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDVrstaFinDokumentaDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.Organizacija> _IDOrganizacijaList;
		
		/// <summary> 
		/// The list of selectable Organizacija
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Organizacija> IDOrganizacijaList
		{
			get {return this._IDOrganizacijaList;}
			set 
			{
				this._IDOrganizacijaList = value;
				this.uxIDOrganizacijaDataGridViewColumn.DataSource = null;
				this.uxIDOrganizacijaDataGridViewColumn.DataSource = this._IDOrganizacijaList;
			}
		}
		
		private bool _allowNewItemInIDOrganizacijaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Organizacija
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDOrganizacijaList
		{
			get { return _allowNewItemInIDOrganizacijaList;}
			set
			{
				this._allowNewItemInIDOrganizacijaList = value;
				this.uxIDOrganizacijaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.VrstaFinDokumenta> _IDVrstaFinDokumentaList;
		
		/// <summary> 
		/// The list of selectable VrstaFinDokumenta
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.VrstaFinDokumenta> IDVrstaFinDokumentaList
		{
			get {return this._IDVrstaFinDokumentaList;}
			set 
			{
				this._IDVrstaFinDokumentaList = value;
				this.uxIDVrstaFinDokumentaDataGridViewColumn.DataSource = null;
				this.uxIDVrstaFinDokumentaDataGridViewColumn.DataSource = this._IDVrstaFinDokumentaList;
			}
		}
		
		private bool _allowNewItemInIDVrstaFinDokumentaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of VrstaFinDokumenta
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDVrstaFinDokumentaList
		{
			get { return _allowNewItemInIDVrstaFinDokumentaList;}
			set
			{
				this._allowNewItemInIDVrstaFinDokumentaList = value;
				this.uxIDVrstaFinDokumentaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.OrganizacijaZiroRacun> _OrganizacijaZiroRacunList;
				
		/// <summary> 
		/// The list of OrganizacijaZiroRacun to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.OrganizacijaZiroRacun> OrganizacijaZiroRacunList
		{
			get {return this._OrganizacijaZiroRacunList;}
			set
			{
				this._OrganizacijaZiroRacunList = value;
				this.uxOrganizacijaZiroRacunBindingSource.DataSource = null;
				this.uxOrganizacijaZiroRacunBindingSource.DataSource = value;
				this.uxOrganizacijaZiroRacunDataGridView.DataSource = null;
				this.uxOrganizacijaZiroRacunDataGridView.DataSource = this.uxOrganizacijaZiroRacunBindingSource;				
				//this.uxOrganizacijaZiroRacunBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxOrganizacijaZiroRacunBindingSource_ListChanged);
				this.uxOrganizacijaZiroRacunBindingSource.CurrentItemChanged += new System.EventHandler(OnOrganizacijaZiroRacunBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnOrganizacijaZiroRacunBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentOrganizacijaZiroRacun = uxOrganizacijaZiroRacunBindingSource.Current as Entities.OrganizacijaZiroRacun;
			
			if (_currentOrganizacijaZiroRacun != null)
			{
				_currentOrganizacijaZiroRacun.Validate();
			}
			//_OrganizacijaZiroRacun.Validate();
			OnCurrentEntityChanged();
		}

		//void uxOrganizacijaZiroRacunBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.OrganizacijaZiroRacun"/> instance.
		/// </summary>
		public Entities.OrganizacijaZiroRacun SelectedOrganizacijaZiroRacun
		{
			get {return this._currentOrganizacijaZiroRacun;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxOrganizacijaZiroRacunDataGridView.VirtualMode;}
			set
			{
				this.uxOrganizacijaZiroRacunDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxOrganizacijaZiroRacunDataGridView.AllowUserToAddRows;}
			set {this.uxOrganizacijaZiroRacunDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxOrganizacijaZiroRacunDataGridView.AllowUserToDeleteRows;}
			set {this.uxOrganizacijaZiroRacunDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxOrganizacijaZiroRacunDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxOrganizacijaZiroRacunDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="OrganizacijaZiroRacunDataGridViewBase"/> class.
		/// </summary>
		public OrganizacijaZiroRacunDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxOrganizacijaZiroRacunDataGridView = new System.Windows.Forms.DataGridView();
			this.uxOrganizacijaZiroRacunBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxOrganizacijaZiroRacunErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDOrganizacijaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxZiroRacunDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxKontoDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDVrstaFinDokumentaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			//this.uxIDOrganizacijaBindingSource = new OrganizacijaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDOrganizacijaBindingSource)).BeginInit();
			//this.uxIDVrstaFinDokumentaBindingSource = new VrstaFinDokumentaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDVrstaFinDokumentaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxOrganizacijaZiroRacunDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxOrganizacijaZiroRacunBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxOrganizacijaZiroRacunErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxOrganizacijaZiroRacunErrorProvider
			// 
			this.uxOrganizacijaZiroRacunErrorProvider.ContainerControl = this;
			this.uxOrganizacijaZiroRacunErrorProvider.DataSource = this.uxOrganizacijaZiroRacunBindingSource;						
			// 
			// uxOrganizacijaZiroRacunDataGridView
			// 
			this.uxOrganizacijaZiroRacunDataGridView.AutoGenerateColumns = false;
			this.uxOrganizacijaZiroRacunDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxOrganizacijaZiroRacunDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDataGridViewColumn,
		this.uxIDOrganizacijaDataGridViewColumn,
		this.uxZiroRacunDataGridViewColumn,
		this.uxKontoDataGridViewColumn,
		this.uxIDVrstaFinDokumentaDataGridViewColumn			});
			this.uxOrganizacijaZiroRacunDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxOrganizacijaZiroRacunDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxOrganizacijaZiroRacunDataGridView.Name = "uxOrganizacijaZiroRacunDataGridView";
			this.uxOrganizacijaZiroRacunDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxOrganizacijaZiroRacunDataGridView.TabIndex = 0;	
			this.uxOrganizacijaZiroRacunDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxOrganizacijaZiroRacunDataGridView.EnableHeadersVisualStyles = false;
			this.uxOrganizacijaZiroRacunDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnOrganizacijaZiroRacunDataGridViewDataError);
			this.uxOrganizacijaZiroRacunDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnOrganizacijaZiroRacunDataGridViewCellValueNeeded);
			this.uxOrganizacijaZiroRacunDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnOrganizacijaZiroRacunDataGridViewCellValuePushed);
			
			//
			// uxIDDataGridViewColumn
			//
			this.uxIDDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDataGridViewColumn.DataPropertyName = "ID";
			this.uxIDDataGridViewColumn.HeaderText = "ID";
			this.uxIDDataGridViewColumn.Name = "uxIDDataGridViewColumn";
			this.uxIDDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDataGridViewColumn.ReadOnly = true;		
			//
			// uxIDOrganizacijaDataGridViewColumn
			//
			this.uxIDOrganizacijaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDOrganizacijaDataGridViewColumn.DataPropertyName = "IDOrganizacija";
			this.uxIDOrganizacijaDataGridViewColumn.HeaderText = "IDOrganizacija";
			this.uxIDOrganizacijaDataGridViewColumn.Name = "uxIDOrganizacijaDataGridViewColumn";
			this.uxIDOrganizacijaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDOrganizacijaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDOrganizacijaDataGridViewColumn.ReadOnly = false;		
			//
			// uxZiroRacunDataGridViewColumn
			//
			this.uxZiroRacunDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxZiroRacunDataGridViewColumn.DataPropertyName = "ZiroRacun";
			this.uxZiroRacunDataGridViewColumn.HeaderText = "ZiroRacun";
			this.uxZiroRacunDataGridViewColumn.Name = "uxZiroRacunDataGridViewColumn";
			this.uxZiroRacunDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxZiroRacunDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxZiroRacunDataGridViewColumn.ReadOnly = false;		
			//
			// uxKontoDataGridViewColumn
			//
			this.uxKontoDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxKontoDataGridViewColumn.DataPropertyName = "Konto";
			this.uxKontoDataGridViewColumn.HeaderText = "Konto";
			this.uxKontoDataGridViewColumn.Name = "uxKontoDataGridViewColumn";
			this.uxKontoDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxKontoDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxKontoDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDVrstaFinDokumentaDataGridViewColumn
			//
			this.uxIDVrstaFinDokumentaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDVrstaFinDokumentaDataGridViewColumn.DataPropertyName = "IDVrstaFinDokumenta";
			this.uxIDVrstaFinDokumentaDataGridViewColumn.HeaderText = "IDVrstaFinDokumenta";
			this.uxIDVrstaFinDokumentaDataGridViewColumn.Name = "uxIDVrstaFinDokumentaDataGridViewColumn";
			this.uxIDVrstaFinDokumentaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDVrstaFinDokumentaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDVrstaFinDokumentaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDOrganizacijaDataGridViewColumn
			//				
			this.uxIDOrganizacijaDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDOrganizacijaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDOrganizacijaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDOrganizacijaDataGridViewColumn.DataSource = uxIDOrganizacijaBindingSource;				
				
			//
			// uxIDVrstaFinDokumentaDataGridViewColumn
			//				
			this.uxIDVrstaFinDokumentaDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDVrstaFinDokumentaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDVrstaFinDokumentaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDVrstaFinDokumentaDataGridViewColumn.DataSource = uxIDVrstaFinDokumentaBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxOrganizacijaZiroRacunDataGridView);
			this.Name = "OrganizacijaZiroRacunDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDOrganizacijaBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDVrstaFinDokumentaBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxOrganizacijaZiroRacunErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxOrganizacijaZiroRacunDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxOrganizacijaZiroRacunBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				OrganizacijaZiroRacunDataGridViewEventArgs args = new OrganizacijaZiroRacunDataGridViewEventArgs();
				args.OrganizacijaZiroRacun = _currentOrganizacijaZiroRacun;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class OrganizacijaZiroRacunDataGridViewEventArgs : System.EventArgs
		{
			private Entities.OrganizacijaZiroRacun	_OrganizacijaZiroRacun;
	
			/// <summary>
			/// the  Entities.OrganizacijaZiroRacun instance.
			/// </summary>
			public Entities.OrganizacijaZiroRacun OrganizacijaZiroRacun
			{
				get { return _OrganizacijaZiroRacun; }
				set { _OrganizacijaZiroRacun = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxOrganizacijaZiroRacunDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnOrganizacijaZiroRacunDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxOrganizacijaZiroRacunDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnOrganizacijaZiroRacunDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxOrganizacijaZiroRacunDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						e.Value = OrganizacijaZiroRacunList[e.RowIndex].ID;
						break;
					case "uxIDOrganizacijaDataGridViewColumn":
						e.Value = OrganizacijaZiroRacunList[e.RowIndex].IDOrganizacija;
						break;
					case "uxZiroRacunDataGridViewColumn":
						e.Value = OrganizacijaZiroRacunList[e.RowIndex].ZiroRacun;
						break;
					case "uxKontoDataGridViewColumn":
						e.Value = OrganizacijaZiroRacunList[e.RowIndex].Konto;
						break;
					case "uxIDVrstaFinDokumentaDataGridViewColumn":
						e.Value = OrganizacijaZiroRacunList[e.RowIndex].IDVrstaFinDokumenta;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxOrganizacijaZiroRacunDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnOrganizacijaZiroRacunDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxOrganizacijaZiroRacunDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						OrganizacijaZiroRacunList[e.RowIndex].ID = (System.Int32)e.Value;
						break;
					case "uxIDOrganizacijaDataGridViewColumn":
						OrganizacijaZiroRacunList[e.RowIndex].IDOrganizacija = (System.Int32)e.Value;
						break;
					case "uxZiroRacunDataGridViewColumn":
						OrganizacijaZiroRacunList[e.RowIndex].ZiroRacun = (System.String)e.Value;
						break;
					case "uxKontoDataGridViewColumn":
						OrganizacijaZiroRacunList[e.RowIndex].Konto = (System.String)e.Value;
						break;
					case "uxIDVrstaFinDokumentaDataGridViewColumn":
						OrganizacijaZiroRacunList[e.RowIndex].IDVrstaFinDokumenta = (System.Int32?)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
